package com.igeekhome.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.igeekhome.pojo.WorkloadStatistics;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 工作量统计 Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2021-03-16
 */
public interface WorkloadStatisticsMapper extends BaseMapper<WorkloadStatistics> {
    @Select("select Max(totalMessageCount) as totalMessageCount from workload_statistics ${ew.customSqlSegment}")
    int gettome(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Max(totalSessionCount) as totalSessionCount from workload_statistics ${ew.customSqlSegment}")
    int gettosecount(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Max(totalEffectiveSessionCount) as totalEffectiveSessionCount from workload_statistics ${ew.customSqlSegment}")
    int gettoeff(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Max(totalEndSessionCount) as totalEndSessionCount from workload_statistics ${ew.customSqlSegment}")
    int gettoendse(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Max(totalSessionTime) as totalSessionTime from workload_statistics ${ew.customSqlSegment}")
    int gettosetime(@Param(Constants.WRAPPER) Wrapper wrapper);
}
